package com.bgs.eat.commodityOrder.service;

import com.bgs.eat.commodityOrder.entity.CommodityOrderEntity;
import com.bgs.eat.config.CommonResult;

import java.text.ParseException;
import java.util.List;

/**
 * @ClassName CommodityOrderService
 * @Description TODO
 * @Author lzy
 * @Date 2022/10/19 19:00
 **/
public interface CommodityOrderService {

    /* *
     * @Author: beisheng
     * @Descriprion: 根据当前骑手所在县查询所有订单
     * @Date: 2022/10/21 15:25
     * @Return: com.bgs.eat.config.CommonResult
     * @Param: [phone]
     */

    CommonResult findAllOrders(String phone,String riderLat,String riderLng,Integer id,Integer status) throws ParseException;

    /* *
     * @Author: beisheng
     * @Descriprion: 骑手抢单/取货/配送完成
     * @Date: 2022/10/24 8:45
     * @Return: com.bgs.eat.config.CommonResult
     * @Param: [id, orderId]
     */

    CommonResult snatchOrders(Integer id,Integer orderId,Integer type,String riderLat,String riderLng) throws ParseException;


    /* *
     * @Author: beisheng
     * @Descriprion: 每过一分钟减剩余时间一分钟
     * @Date: 2022/10/25 15:10
     * @Return: com.bgs.eat.config.CommonResult
     * @Param: [commodityOrderEntity]
     */

    CommonResult updateTime(CommodityOrderEntity commodityOrderEntity);

    /* *
     * @Author: beisheng
     * @Descriprion: 根据骑手ID查询今日订单
     * @Date: 2022/10/27 15:32
     * @Return: com.bgs.eat.config.CommonResult
     * @Param: [riderId]
     */

    CommonResult getTodayOrder(Integer riderId);

    /* *
     * @Author: beisheng
     * @Descriprion: 查询历史订单
     * @Date: 2022/10/28 9:19
     * @Return: com.bgs.eat.config.CommonResult
     * @Param: [id, status, stutus1]
     */

    CommonResult findAllhistoryOrders(Integer id,Integer status, Integer stutus1);

    /**
    * @Description 提交订单时获取预计到达时间（门户用户端）
    * @Author lzy
    * @Date 2022/10/29 9:57
    * @Return com.bgs.eat.config.CommonResult
    * @param userLat
    * @param userLng
    * @param shopLat
    * @param shopLng
    * @param sumMealTime 总出餐时间
    */
    CommonResult getDeliveryTime(String userLat, String userLng, String shopLat, String shopLng, Integer sumMealTime);



    /**
    * @Description 用户提交商品订单（门户用户端）
    * @Author lzy
    * @Date 2022/10/30 19:36
    * @Return com.bgs.eat.config.CommonResult
    * @param commodityOrderEntity
    */
    CommonResult submitCommodityOrder(CommodityOrderEntity commodityOrderEntity);

    /**
     * @Author gpd
     * @Description 查询对应配送状态的订单信息
     * @Date 2022-10-31 下午 03:53
     * @Return com.bgs.eat.config.CommonResult

     */
    List<CommodityOrderEntity> getCommodityOrderList(Integer shopId, Integer distributionStatus);

    /**
     * @Author gpd
     * @Description 商家选择配送方式
     * @Date 2022-11-01 上午 11:38
     * @Return com.bgs.eat.config.CommonResult

     */
    Integer choseDeliveryMethod(CommodityOrderEntity commodityOrderEntity);
}
